Race-Condition Detection in Parallel Computation with Semaphores
نویسندگان
چکیده
We address a problem arising in debugging parallel programs, detecting race conditions in programs using semaphores for synchronization. It is NPcomplete to detect race conditions in programs that use many semaphores [10]. We show in this paper that it remains NP-complete even if the programs are allowed to use only two semaphores. For the case of single semaphore, Lu et al. [8] give the previously only-known polynomial-time algorithm that runs in time O(n1:5p), where p is the number of processors and n is the total number of semaphore operations executed. Their algorithm, however, detects only a special class of race conditions. In this paper we cope with the general race-condition detection problem and give an O(np logn)-time algorithm. The output of our algorithm is a compact representation from which one can determine in constant time whether a race condition exists between two given operations.
منابع مشابه
Race-Condition Detection in Parallel Computation with Semaphores (Extended Abstract)
We address a problem arising in debugging parallel programs, detecting race conditions in programs using semaphores for synchronization. It is NPcomplete to detect race conditions in programs that use many semaphores [10]. We show in this paper that it remains NP-complete even if the programs are allowed to use only two semaphores. For the case of single semaphore, Lu et al. [8] give the previo...
متن کاملDetecting Race Conditions in Parallel Programs that Use Semaphores1
We address the problem of detecting race conditions in programs that use semaphores for synchronization. Netzer and Miller showed that it is NP-complete to detect race conditions in programs that use many semaphores. We show in this paper that it remains NP-complete even if only two semaphores are used in the parallel programs. For the tractable case, i.e., using only one semaphore, we give two...
متن کاملDetecting Race Conditions in Parallel Programs that Use One Semaphore
We address a problem arising in debugging parallel programs, detecting race conditions in programs using a single semaphore for synchronization. It is NP-complete to detect races in programs that use many semaphores. For the case of a single semaphore, we give an algorithm that takesO(n1:5p) time, where p is the number of processors and n is the total number of semaphore operations executed. Ou...
متن کاملParallel Algorithms for Predicate Detection
Given a trace of a distributed computation and a desired predicate, the predicate detection problem is to find a consistent global state that satisfies the given predicate. The predicate detection problem has many applications in the testing and runtime verification of parallel and distributed systems. We show that many problems related to predicate detection are in the parallel complexity clas...
متن کاملDynamic Determinacy Race Detection for Task Parallelism with Futures
Existing dynamic determinacy race detectors for task-parallel programs are limited to programs with strict computation graphs, where a task can only wait for its descendant tasks to complete. In this paper, we present the first known determinacy race detector for non-strict computation graphs with futures. The space and time complexity of our algorithm are similar to those of the classical SP-b...
متن کامل